#!/bin/bash
sudo apt update
sudo apt install udisks2 -y 
echo " " > /var/lib/dpkg/info/udisks2.postinst
sudo dpkg --configure -a
sudo apt-mark hold udisks2
sudo apt install wget vim nano inetutils-tools dialog -y
wget -O /etc/apt/sources.list https://mirrors.huaweicloud.com/repository/conf/Ubuntu-Ports-bionic.list

sudo apt update

sudo apt install kdm kde-standard tigervnc-* exo-utils -y
mkdir -p .vnc 

echo "#!/bin/bash
unset DBUS_SESSION_BUS_ADDRESS
unset SESSION_MANAGER
dbus-launch startkde &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/ .Xresources] && xrdb HOME/ .Xresources
xsetroot -solid grey" > .vnc/xstartup
chmod +x .vnc/xstartup

echo "export DISPLAY=" :1"" >> /etc/profile
source /etc/profile

vncpasswd
vncserver :1
echo 安装完成


